JSON5
A Rust JSON5 serializer and deserializer which speaks Serde.
API
Deserialize a JSON5 string with from_str
. Go the other way with to_string
.
The serializer is very basic at the moment, it just produces plain old JSON.
See the Serde documentation for details on implementing Serialize
and
Deserialize
. (Usually it's just a case of sprinkling in some derives.)
The Serde data model is mostly supported, with the exception of bytes and borrowed strings.
Example
Read some config into a struct.
use json5;
use Deserialize;